﻿#region Copyright

//  ======================================================
//      Copyright (c) 2011 Toulr All rights reserved.
//     
//      The use and distribution terms for this software are contained in the file
//      named license.txt, which can be found in the root of this distribution.
//      By using this software in any fashion, you are agreeing to be bound by the
//      terms of this license.
//     
//     You must not remove this notice, or any other, from this software.
//  ======================================================

#endregion

#region Using Namespaces

using System;
using System.ComponentModel.DataAnnotations;
using Toulr.Domains.System;

#endregion

namespace Toulr.Domains.Account
{
    public class UserAddress
    {
        #region Property

        /// <summary>
        ///   记录标识
        /// </summary>
        [Key]
        public int Id { get; set; }

        /// <summary>
        ///   用户Id
        /// </summary>
        public int UserId { get; set; }

        /// <summary>
        ///   收货人姓名
        /// </summary>
        public string RecieveUserName { get; set; }

        /// <summary>
        ///   省ID
        /// </summary>
        public int ProvinceId { get; set; }

        /// <summary>
        ///   城市ID
        /// </summary>
        public int CityId { get; set; }

        /// <summary>
        ///   区县ID
        /// </summary>
        public int CountryId { get; set; }

        /// <summary>
        ///   详细地址
        /// </summary>
        [MaxLength(250)]
        public string Address { get; set; }

        /// <summary>
        ///   邮政编码
        /// </summary>
        public int PostCode { get; set; }

        /// <summary>
        ///   电话
        /// </summary>
        [MaxLength(16)]
        public string Phone { get; set; }

        /// <summary>
        ///   移动电话
        /// </summary>
        [MaxLength(16)]
        public string MobilePhone { get; set; }

        /// <summary>
        ///   是否默认地址
        /// </summary>
        public bool Default { get; set; }

        #endregion

        #region Associaction Objects

        /// <summary>
        ///   用户
        /// </summary>
        [NotMapped]
        public User User
        {
            get { throw new NotImplementedException(); }
        }

        /// <summary>
        ///   省
        /// </summary>
        [NotMapped]
        public virtual Province Province
        {
            get { throw new NotImplementedException(); }
        }

        /// <summary>
        ///   城市
        /// </summary>
        [NotMapped]
        public virtual City City
        {
            get { throw new NotImplementedException(); }
        }

        /// <summary>
        ///   区县
        /// </summary>
        [NotMapped]
        public virtual Counties Country
        {
            get { throw new NotImplementedException(); }
        }

        #endregion
    }
}